import { post,get } from '@/utils/http'

//用户登录
export const signin = (data : any) => {return post('/api/security/login',data)}

//用户注册
export const signup = (data : any) => {return post('/api/security/register',data)}

//用户登出
export const signout = (data : any) => {return post('/api/security/logout',data)}

//重置密码
export const resetPass = (data : any) => {return post('/api/security/password/reset',data)}

//刷新令牌
export const refreshToken = (data : any) => {return post('/api/security/token/refresh',data)}

//注销账号
export const applyCancellationApi = (data : any) => {return post('/security/user/applyCancellation',data)}

//撤销申请
export const recallCancellationApi = (data : any) => {return post('/security/user/recallCancellation',data)}

//查询注销账号
export const getCancellationApi = () => {return get('/security/user/getCancellation')}

//获取验证码
export const getKaptchaPhone = (data : any) => {return get('/api/captcha/mobile/authorize',data)}

//登陆设备列表
export const listUserDeviceApi = () => {return get("/security/user/listUserDevice")}

//远程强制退出
export const forceLogoutApi = (tokenId : string) => {return post(`/security/user/forceLogout/${tokenId}`)}

//修改个人信息
export const updateUserBaseApi = (data:any) => {return post('/security/user/updateUserBase',data)}

//修改密码
export const changeUserPassApi = (data:any) => {return post('/security/user/changeUserPass',data)} 